import {createStore, applyMiddleware} from 'redux';
import thunk from 'redux-thunk';
import Reducers from './reducers';

const middleware = [thunk];//中间件
const store = createStore(Reducers, applyMiddleware(...middleware));//创建仓库


store.subscribe(function(){
    console.log(store.getState());
})
export default store